<?php

/**
 * Contact Component 
 */
class ComContactController extends AController {

    public function actionIndex() {
        $model = new DComContact;
        
        $model->getData();
        $this->render('index', array(
            'model' => $model,
        ));
    }
    
    public function actionUpdate() {
        $model = new DComContact;
        
        if (isset($_POST['DComContact'])) {
            $model->makeFile($_POST['DComContact']);
            Yii::app()->user->setFlash('message', 'updated');
            $this->redirect('index');
        }

        $model->getData();
        $this->render('update', array(
            'model' => $model,
            'infoAttribute' => $model->getInfoAttribute(),
        ));
    }
}